package com.unionpay.mpds.model;

// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Pos entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_POS", uniqueConstraints = @UniqueConstraint(columnNames = "POS_INDEX"))
public class Pos implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -6839524209817837775L;
	// Fields

		private String branchNo;
		private String shopNo;
		private String posNo;
		private String posType;
		private String posParaflag;
		private String posCurprogver;
		private String keyIndex;
		private String comIndex;
		private Integer posTicketnums;
		private String posLogout;
		private Integer posEchotime;
		private Integer posMaxrefundamt;
		private String posTransRetry;
		private String posManMode;
		private String posTipPer;
		private String posTip;
		private String posTransDefault;
		private String posConfirmMode;
		private String posCommRetry;
		private String posPinflag;
		private String posCardflag;
		private Integer posMaxcnt;
		private Integer posMaxamt;
		private Integer posTimeout;
		private Integer posTrace;
		private Integer posBatch;
		private String posTpdu;
		private String posProgflag;
		private String posNewprogver;
		private String instNo;
		private String shopNoP;
		private String posIndex;

		// Constructors

		/** default constructor */
		public Pos() {
		}

		/** full constructor */
		public Pos(String branchNo, String shopNo, String posNo, String posType,
				String posParaflag, String posCurprogver, String keyIndex,
				String comIndex, Integer posTicketnums, String posLogout,
				Integer posEchotime, Integer posMaxrefundamt,
				String posTransRetry, String posManMode, String posTipPer,
				String posTip, String posTransDefault, String posConfirmMode,
				String posCommRetry, String posPinflag, String posCardflag,
				Integer posMaxcnt, Integer posMaxamt, Integer posTimeout,
				Integer posTrace, Integer posBatch, String posTpdu,
				String posProgflag, String posNewprogver, String instNo,
				String shopNoP, String posIndex) {
			this.branchNo = branchNo;
			this.shopNo = shopNo;
			this.posNo = posNo;
			this.posType = posType;
			this.posParaflag = posParaflag;
			this.posCurprogver = posCurprogver;
			this.keyIndex = keyIndex;
			this.comIndex = comIndex;
			this.posTicketnums = posTicketnums;
			this.posLogout = posLogout;
			this.posEchotime = posEchotime;
			this.posMaxrefundamt = posMaxrefundamt;
			this.posTransRetry = posTransRetry;
			this.posManMode = posManMode;
			this.posTipPer = posTipPer;
			this.posTip = posTip;
			this.posTransDefault = posTransDefault;
			this.posConfirmMode = posConfirmMode;
			this.posCommRetry = posCommRetry;
			this.posPinflag = posPinflag;
			this.posCardflag = posCardflag;
			this.posMaxcnt = posMaxcnt;
			this.posMaxamt = posMaxamt;
			this.posTimeout = posTimeout;
			this.posTrace = posTrace;
			this.posBatch = posBatch;
			this.posTpdu = posTpdu;
			this.posProgflag = posProgflag;
			this.posNewprogver = posNewprogver;
			this.instNo = instNo;
			this.shopNoP = shopNoP;
			this.posIndex = posIndex;
		}

		// Property accessors

		@Column(name = "BRANCH_NO", nullable = false, length = 5)
		public String getBranchNo() {
			return this.branchNo;
		}

		public void setBranchNo(String branchNo) {
			this.branchNo = branchNo;
		}

		@Column(name = "SHOP_NO", nullable = false, length = 15)
		public String getShopNo() {
			return this.shopNo;
		}

		public void setShopNo(String shopNo) {
			this.shopNo = shopNo;
		}

		@Column(name = "POS_NO", nullable = false, length = 8)
		public String getPosNo() {
			return this.posNo;
		}

		public void setPosNo(String posNo) {
			this.posNo = posNo;
		}

		@Column(name = "POS_TYPE", nullable = false, length = 2)
		public String getPosType() {
			return this.posType;
		}

		public void setPosType(String posType) {
			this.posType = posType;
		}

		@Column(name = "POS_PARAFLAG", nullable = false, length = 1)
		public String getPosParaflag() {
			return this.posParaflag;
		}

		public void setPosParaflag(String posParaflag) {
			this.posParaflag = posParaflag;
		}

		@Column(name = "POS_CURPROGVER", nullable = false, length = 10)
		public String getPosCurprogver() {
			return this.posCurprogver;
		}

		public void setPosCurprogver(String posCurprogver) {
			this.posCurprogver = posCurprogver;
		}

		@Column(name = "KEY_INDEX", nullable = false, length = 23)
		public String getKeyIndex() {
			return this.keyIndex;
		}

		public void setKeyIndex(String keyIndex) {
			this.keyIndex = keyIndex;
		}

		@Column(name = "COM_INDEX", nullable = false, length = 3)
		public String getComIndex() {
			return this.comIndex;
		}

		public void setComIndex(String comIndex) {
			this.comIndex = comIndex;
		}

		@Column(name = "POS_TICKETNUMS", nullable = false, precision = 22, scale = 0)
		public Integer getPosTicketnums() {
			return this.posTicketnums;
		}

		public void setPosTicketnums(Integer posTicketnums) {
			this.posTicketnums = posTicketnums;
		}

		@Column(name = "POS_LOGOUT", nullable = false, length = 1)
		public String getPosLogout() {
			return this.posLogout;
		}

		public void setPosLogout(String posLogout) {
			this.posLogout = posLogout;
		}

		@Column(name = "POS_ECHOTIME", nullable = false, precision = 22, scale = 0)
		public Integer getPosEchotime() {
			return this.posEchotime;
		}

		public void setPosEchotime(Integer posEchotime) {
			this.posEchotime = posEchotime;
		}

		@Column(name = "POS_MAXREFUNDAMT", nullable = false, precision = 22, scale = 0)
		public Integer getPosMaxrefundamt() {
			return this.posMaxrefundamt;
		}

		public void setPosMaxrefundamt(Integer posMaxrefundamt) {
			this.posMaxrefundamt = posMaxrefundamt;
		}

		@Column(name = "POS_TRANS_RETRY", nullable = false, length = 1)
		public String getPosTransRetry() {
			return this.posTransRetry;
		}

		public void setPosTransRetry(String posTransRetry) {
			this.posTransRetry = posTransRetry;
		}

		@Column(name = "POS_MAN_MODE", nullable = false, length = 1)
		public String getPosManMode() {
			return this.posManMode;
		}

		public void setPosManMode(String posManMode) {
			this.posManMode = posManMode;
		}

		@Column(name = "POS_TIP_PER", nullable = false, length = 2)
		public String getPosTipPer() {
			return this.posTipPer;
		}

		public void setPosTipPer(String posTipPer) {
			this.posTipPer = posTipPer;
		}

		@Column(name = "POS_TIP", nullable = false, length = 1)
		public String getPosTip() {
			return this.posTip;
		}

		public void setPosTip(String posTip) {
			this.posTip = posTip;
		}

		@Column(name = "POS_TRANS_DEFAULT", nullable = false, length = 1)
		public String getPosTransDefault() {
			return this.posTransDefault;
		}

		public void setPosTransDefault(String posTransDefault) {
			this.posTransDefault = posTransDefault;
		}

		@Column(name = "POS_CONFIRM_MODE", nullable = false, length = 1)
		public String getPosConfirmMode() {
			return this.posConfirmMode;
		}

		public void setPosConfirmMode(String posConfirmMode) {
			this.posConfirmMode = posConfirmMode;
		}

		@Column(name = "POS_COMM_RETRY", nullable = false, length = 1)
		public String getPosCommRetry() {
			return this.posCommRetry;
		}

		public void setPosCommRetry(String posCommRetry) {
			this.posCommRetry = posCommRetry;
		}

		@Column(name = "POS_PINFLAG", nullable = false, length = 10)
		public String getPosPinflag() {
			return this.posPinflag;
		}

		public void setPosPinflag(String posPinflag) {
			this.posPinflag = posPinflag;
		}

		@Column(name = "POS_CARDFLAG", nullable = false, length = 10)
		public String getPosCardflag() {
			return this.posCardflag;
		}

		public void setPosCardflag(String posCardflag) {
			this.posCardflag = posCardflag;
		}

		@Column(name = "POS_MAXCNT", nullable = false, precision = 22, scale = 0)
		public Integer getPosMaxcnt() {
			return this.posMaxcnt;
		}

		public void setPosMaxcnt(Integer posMaxcnt) {
			this.posMaxcnt = posMaxcnt;
		}

		@Column(name = "POS_MAXAMT", nullable = false, precision = 22, scale = 0)
		public Integer getPosMaxamt() {
			return this.posMaxamt;
		}

		public void setPosMaxamt(Integer posMaxamt) {
			this.posMaxamt = posMaxamt;
		}

		@Column(name = "POS_TIMEOUT", nullable = false, precision = 22, scale = 0)
		public Integer getPosTimeout() {
			return this.posTimeout;
		}

		public void setPosTimeout(Integer posTimeout) {
			this.posTimeout = posTimeout;
		}

		@Column(name = "POS_TRACE", nullable = false, precision = 22, scale = 0)
		public Integer getPosTrace() {
			return this.posTrace;
		}

		public void setPosTrace(Integer posTrace) {
			this.posTrace = posTrace;
		}

		@Column(name = "POS_BATCH", nullable = false, precision = 22, scale = 0)
		public Integer getPosBatch() {
			return this.posBatch;
		}

		public void setPosBatch(Integer posBatch) {
			this.posBatch = posBatch;
		}

		@Column(name = "POS_TPDU", nullable = false, length = 10)
		public String getPosTpdu() {
			return this.posTpdu;
		}

		public void setPosTpdu(String posTpdu) {
			this.posTpdu = posTpdu;
		}

		@Column(name = "POS_PROGFLAG", nullable = false, length = 1)
		public String getPosProgflag() {
			return this.posProgflag;
		}

		public void setPosProgflag(String posProgflag) {
			this.posProgflag = posProgflag;
		}

		@Column(name = "POS_NEWPROGVER", nullable = false, length = 10)
		public String getPosNewprogver() {
			return this.posNewprogver;
		}

		public void setPosNewprogver(String posNewprogver) {
			this.posNewprogver = posNewprogver;
		}

		@Column(name = "INST_NO", nullable = false, length = 15)
		public String getInstNo() {
			return this.instNo;
		}

		public void setInstNo(String instNo) {
			this.instNo = instNo;
		}

		@Column(name = "SHOP_NO_P", nullable = false, length = 15)
		public String getShopNoP() {
			return this.shopNoP;
		}

		public void setShopNoP(String shopNoP) {
			this.shopNoP = shopNoP;
		}

		@Id
		@Column(name = "POS_INDEX", unique = true, nullable = false, length = 23)
		public String getPosIndex() {
			return this.posIndex;
		}

		public void setPosIndex(String posIndex) {
			this.posIndex = posIndex;
		}

		public boolean equals(Object other) {
			if ((this == other))
				return true;
			if ((other == null))
				return false;
			if (!(other instanceof Pos))
				return false;
			Pos castOther = (Pos) other;

			return ((this.getBranchNo() == castOther.getBranchNo()) || (this
					.getBranchNo() != null && castOther.getBranchNo() != null && this
					.getBranchNo().equals(castOther.getBranchNo())))
					&& ((this.getShopNo() == castOther.getShopNo()) || (this
							.getShopNo() != null && castOther.getShopNo() != null && this
							.getShopNo().equals(castOther.getShopNo())))
					&& ((this.getPosNo() == castOther.getPosNo()) || (this
							.getPosNo() != null && castOther.getPosNo() != null && this
							.getPosNo().equals(castOther.getPosNo())))
					&& ((this.getPosType() == castOther.getPosType()) || (this
							.getPosType() != null && castOther.getPosType() != null && this
							.getPosType().equals(castOther.getPosType())))
					&& ((this.getPosParaflag() == castOther.getPosParaflag()) || (this
							.getPosParaflag() != null
							&& castOther.getPosParaflag() != null && this
							.getPosParaflag().equals(castOther.getPosParaflag())))
					&& ((this.getPosCurprogver() == castOther.getPosCurprogver()) || (this
							.getPosCurprogver() != null
							&& castOther.getPosCurprogver() != null && this
							.getPosCurprogver()
							.equals(castOther.getPosCurprogver())))
					&& ((this.getKeyIndex() == castOther.getKeyIndex()) || (this
							.getKeyIndex() != null
							&& castOther.getKeyIndex() != null && this
							.getKeyIndex().equals(castOther.getKeyIndex())))
					&& ((this.getComIndex() == castOther.getComIndex()) || (this
							.getComIndex() != null
							&& castOther.getComIndex() != null && this
							.getComIndex().equals(castOther.getComIndex())))
					&& ((this.getPosTicketnums() == castOther.getPosTicketnums()) || (this
							.getPosTicketnums() != null
							&& castOther.getPosTicketnums() != null && this
							.getPosTicketnums()
							.equals(castOther.getPosTicketnums())))
					&& ((this.getPosLogout() == castOther.getPosLogout()) || (this
							.getPosLogout() != null
							&& castOther.getPosLogout() != null && this
							.getPosLogout().equals(castOther.getPosLogout())))
					&& ((this.getPosEchotime() == castOther.getPosEchotime()) || (this
							.getPosEchotime() != null
							&& castOther.getPosEchotime() != null && this
							.getPosEchotime().equals(castOther.getPosEchotime())))
					&& ((this.getPosMaxrefundamt() == castOther
							.getPosMaxrefundamt()) || (this.getPosMaxrefundamt() != null
							&& castOther.getPosMaxrefundamt() != null && this
							.getPosMaxrefundamt().equals(
									castOther.getPosMaxrefundamt())))
					&& ((this.getPosTransRetry() == castOther.getPosTransRetry()) || (this
							.getPosTransRetry() != null
							&& castOther.getPosTransRetry() != null && this
							.getPosTransRetry()
							.equals(castOther.getPosTransRetry())))
					&& ((this.getPosManMode() == castOther.getPosManMode()) || (this
							.getPosManMode() != null
							&& castOther.getPosManMode() != null && this
							.getPosManMode().equals(castOther.getPosManMode())))
					&& ((this.getPosTipPer() == castOther.getPosTipPer()) || (this
							.getPosTipPer() != null
							&& castOther.getPosTipPer() != null && this
							.getPosTipPer().equals(castOther.getPosTipPer())))
					&& ((this.getPosTip() == castOther.getPosTip()) || (this
							.getPosTip() != null && castOther.getPosTip() != null && this
							.getPosTip().equals(castOther.getPosTip())))
					&& ((this.getPosTransDefault() == castOther
							.getPosTransDefault()) || (this.getPosTransDefault() != null
							&& castOther.getPosTransDefault() != null && this
							.getPosTransDefault().equals(
									castOther.getPosTransDefault())))
					&& ((this.getPosConfirmMode() == castOther.getPosConfirmMode()) || (this
							.getPosConfirmMode() != null
							&& castOther.getPosConfirmMode() != null && this
							.getPosConfirmMode().equals(
									castOther.getPosConfirmMode())))
					&& ((this.getPosCommRetry() == castOther.getPosCommRetry()) || (this
							.getPosCommRetry() != null
							&& castOther.getPosCommRetry() != null && this
							.getPosCommRetry().equals(castOther.getPosCommRetry())))
					&& ((this.getPosPinflag() == castOther.getPosPinflag()) || (this
							.getPosPinflag() != null
							&& castOther.getPosPinflag() != null && this
							.getPosPinflag().equals(castOther.getPosPinflag())))
					&& ((this.getPosCardflag() == castOther.getPosCardflag()) || (this
							.getPosCardflag() != null
							&& castOther.getPosCardflag() != null && this
							.getPosCardflag().equals(castOther.getPosCardflag())))
					&& ((this.getPosMaxcnt() == castOther.getPosMaxcnt()) || (this
							.getPosMaxcnt() != null
							&& castOther.getPosMaxcnt() != null && this
							.getPosMaxcnt().equals(castOther.getPosMaxcnt())))
					&& ((this.getPosMaxamt() == castOther.getPosMaxamt()) || (this
							.getPosMaxamt() != null
							&& castOther.getPosMaxamt() != null && this
							.getPosMaxamt().equals(castOther.getPosMaxamt())))
					&& ((this.getPosTimeout() == castOther.getPosTimeout()) || (this
							.getPosTimeout() != null
							&& castOther.getPosTimeout() != null && this
							.getPosTimeout().equals(castOther.getPosTimeout())))
					&& ((this.getPosTrace() == castOther.getPosTrace()) || (this
							.getPosTrace() != null
							&& castOther.getPosTrace() != null && this
							.getPosTrace().equals(castOther.getPosTrace())))
					&& ((this.getPosBatch() == castOther.getPosBatch()) || (this
							.getPosBatch() != null
							&& castOther.getPosBatch() != null && this
							.getPosBatch().equals(castOther.getPosBatch())))
					&& ((this.getPosTpdu() == castOther.getPosTpdu()) || (this
							.getPosTpdu() != null && castOther.getPosTpdu() != null && this
							.getPosTpdu().equals(castOther.getPosTpdu())))
					&& ((this.getPosProgflag() == castOther.getPosProgflag()) || (this
							.getPosProgflag() != null
							&& castOther.getPosProgflag() != null && this
							.getPosProgflag().equals(castOther.getPosProgflag())))
					&& ((this.getPosNewprogver() == castOther.getPosNewprogver()) || (this
							.getPosNewprogver() != null
							&& castOther.getPosNewprogver() != null && this
							.getPosNewprogver()
							.equals(castOther.getPosNewprogver())))
					&& ((this.getInstNo() == castOther.getInstNo()) || (this
							.getInstNo() != null && castOther.getInstNo() != null && this
							.getInstNo().equals(castOther.getInstNo())))
					&& ((this.getShopNoP() == castOther.getShopNoP()) || (this
							.getShopNoP() != null && castOther.getShopNoP() != null && this
							.getShopNoP().equals(castOther.getShopNoP())))
					&& ((this.getPosIndex() == castOther.getPosIndex()) || (this
							.getPosIndex() != null
							&& castOther.getPosIndex() != null && this
							.getPosIndex().equals(castOther.getPosIndex())));
		}

		public int hashCode() {
			int result = 17;

			result = 37 * result
					+ (getBranchNo() == null ? 0 : this.getBranchNo().hashCode());
			result = 37 * result
					+ (getShopNo() == null ? 0 : this.getShopNo().hashCode());
			result = 37 * result
					+ (getPosNo() == null ? 0 : this.getPosNo().hashCode());
			result = 37 * result
					+ (getPosType() == null ? 0 : this.getPosType().hashCode());
			result = 37
					* result
					+ (getPosParaflag() == null ? 0 : this.getPosParaflag()
							.hashCode());
			result = 37
					* result
					+ (getPosCurprogver() == null ? 0 : this.getPosCurprogver()
							.hashCode());
			result = 37 * result
					+ (getKeyIndex() == null ? 0 : this.getKeyIndex().hashCode());
			result = 37 * result
					+ (getComIndex() == null ? 0 : this.getComIndex().hashCode());
			result = 37
					* result
					+ (getPosTicketnums() == null ? 0 : this.getPosTicketnums()
							.hashCode());
			result = 37 * result
					+ (getPosLogout() == null ? 0 : this.getPosLogout().hashCode());
			result = 37
					* result
					+ (getPosEchotime() == null ? 0 : this.getPosEchotime()
							.hashCode());
			result = 37
					* result
					+ (getPosMaxrefundamt() == null ? 0 : this.getPosMaxrefundamt()
							.hashCode());
			result = 37
					* result
					+ (getPosTransRetry() == null ? 0 : this.getPosTransRetry()
							.hashCode());
			result = 37
					* result
					+ (getPosManMode() == null ? 0 : this.getPosManMode()
							.hashCode());
			result = 37 * result
					+ (getPosTipPer() == null ? 0 : this.getPosTipPer().hashCode());
			result = 37 * result
					+ (getPosTip() == null ? 0 : this.getPosTip().hashCode());
			result = 37
					* result
					+ (getPosTransDefault() == null ? 0 : this.getPosTransDefault()
							.hashCode());
			result = 37
					* result
					+ (getPosConfirmMode() == null ? 0 : this.getPosConfirmMode()
							.hashCode());
			result = 37
					* result
					+ (getPosCommRetry() == null ? 0 : this.getPosCommRetry()
							.hashCode());
			result = 37
					* result
					+ (getPosPinflag() == null ? 0 : this.getPosPinflag()
							.hashCode());
			result = 37
					* result
					+ (getPosCardflag() == null ? 0 : this.getPosCardflag()
							.hashCode());
			result = 37 * result
					+ (getPosMaxcnt() == null ? 0 : this.getPosMaxcnt().hashCode());
			result = 37 * result
					+ (getPosMaxamt() == null ? 0 : this.getPosMaxamt().hashCode());
			result = 37
					* result
					+ (getPosTimeout() == null ? 0 : this.getPosTimeout()
							.hashCode());
			result = 37 * result
					+ (getPosTrace() == null ? 0 : this.getPosTrace().hashCode());
			result = 37 * result
					+ (getPosBatch() == null ? 0 : this.getPosBatch().hashCode());
			result = 37 * result
					+ (getPosTpdu() == null ? 0 : this.getPosTpdu().hashCode());
			result = 37
					* result
					+ (getPosProgflag() == null ? 0 : this.getPosProgflag()
							.hashCode());
			result = 37
					* result
					+ (getPosNewprogver() == null ? 0 : this.getPosNewprogver()
							.hashCode());
			result = 37 * result
					+ (getInstNo() == null ? 0 : this.getInstNo().hashCode());
			result = 37 * result
					+ (getShopNoP() == null ? 0 : this.getShopNoP().hashCode());
			result = 37 * result
					+ (getPosIndex() == null ? 0 : this.getPosIndex().hashCode());
			return result;
		}

}